<div data-page="Subject_tiku" class="page my_subject lesson_detail">
    <input type="hidden" id="knowsid" value="<{$knowsid}>" />
    <script>
    var video_info = <{:json_encode($knowsData['video_info'])}>
    </script>
    <div class="page-content" style="background-color:#000">
    <include file="Public:header_lesson" />
        <div class="col-md-8 mgt10">
            <div id="videoWrapper" style="overflow:hidden; min-height:220px">
            </div>
        </div>
        <div class="action_box pos_rel col-md-4" data-type="swiperPage" style="background-color:#fff; overflow-y:auto; padding-top:10px;">
            <div id="ueditorDrager" class="editor-drag-wrap">
                <div class="editor-drager" unselectable="on"> <span></span> </div>
            </div>
            <ul class="nav nav-tabs text swiperTap" id="myTab" style="padding-left:10px;">
                <li class="active" style="margin-left:10px"><a href="#subject_list" class="text-center" data-toggle="tab">课程表</a></li>
                <li class=""><a href="#detail_notes" class="text-center" data-toggle="tab">笔记</a></li>
                <li class=""><a href="#post_ask" class="text-center" data-toggle="tab">提问</a></li>
                <if condition="strip_tags($knowsData['task'])">
                <li class=""><a href="#task" class="text-center" data-toggle="tab">任务</a></li> 
                </if>
                </if>
            </ul>
            <div class="tab-content swiperContent" style="padding-top:10px;">
                <div class="tab-pane active tabPane" id="subject_list">
                    <div class="tabPaneContent" style="padding:0px;padding-bottom: 10px ">
                        <{:Widget( 'BoxEdu/Index/subject_list',array( 'subjectid'=>$subjectid,'url'=>'Subject/lesson_detail','show_down'=>1))}>
                    </div>
                </div>
                <div class="tab-pane tabPane" id="detail_notes">
                    <textarea style="width:100%; height:300px" data-type="kindeditor" id="contentNote"><{$notes}></textarea>
                    <button id="btnSaveLessonNote" onclick="save_notes()" class="btn mgt20 btn-large btn-block btn-success" data-loading-text="保存中…">保存</button>
                </div>
                <div class="tab-pane tabPane" id="post_ask">
                    <style type="text/css">
                    #post_ask #addTopic {
                        margin-top: 0px!important
                    }
                    </style>
                    <{:Widget( 'BoxSns/Topic/topicList',array( 'type'=>'eduAsk','where'=>array('pid3'=>$knowsid),'form'=>array('pid'=>$subjectid,'pid2'=>$knowsData['knowssectionid'],'pid3'=>$knowsData['knowsid'])))}>
                </div>
                <div class="tab-pane tabPane" id="questions">
                    <textarea style=" width: 100%;border: 1px solid #ccc;height: 60px;"></textarea>
                </div>
                 <div class="tab-pane tabPane" id="task">
                   <{$knowsData['task']}>
                </div>
               
            </div>
            <div id="ueditorMask" class="hide"></div>
            <div id="okSaveLessonNote" class="text hide">保存成功</div>
                  <div id="fixedBottoms">
       

          
        </div>

    </div>
    </div>
    <script>
    $("#videoWrapper").on("videoPlay", function(event) {
        // alert("videoPlay");	
        // <if condition="$knowHistory['play_time']">
        CKobject.getObjectById('ckplayer_videoWrapper').videoSeek("<{$knowHistory['play_time']}>");
        //	</if>	
    })
    $("#videoWrapper").on("videoPause", function(event) {
             //alert('videoPause');	
        })
        //监听时间
    var timeArr = {};
    $("#videoWrapper").on("videoTime", function(event) {
        // console.log(video_info);
        var play_id = "ckplayer_videoWrapper";
        var data = CKobject.getObjectById(play_id).getStatus();
        var time = parseInt(data['time']);
        if (time % 2 == 0 && typeof(timeArr[time]) == "undefined") {
            $.post("/Subject/user_play_video", {
                type: 1,
                time: time,
                knowsid: "<{$knowsid}>"
            })
        }
        timeArr[time] = time;
    })

    $("#videoWrapper").on("videoStop", function(event) {
        var play_id = "ckplayer_videoWrapper";
        $.post("/Subject/user_play_video", {
            type: 2,
            knowsid: "<{$knowsid}>"
        })
    })
    </script>
</div>
